﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IBS
{
    public partial class IbsDataContext
    {
        public IEnumerable<SaleOrderList> GetSaleOrdersTNK()
        {
            var sql = String.Format(@"SELECT ID_RECORD as INVOICE_ID FROM  edex.WH_SALESORDER WHERE STATUS = 0 AND COMPANY_KEY>5000");

            return new DB
                .Oracle(this.connectionString)
                .Excecute<SaleOrderList>(sql).AsEnumerable();
        }

        public IEnumerable<SaleOrderList> GetSaleOrdersBP()
        {
            var sql = String.Format(@"SELECT ID_RECORD as INVOICE_ID FROM  edex.WH_SALESORDER WHERE STATUS = 0 AND COMPANY_KEY<=5000");

            return new DB
                .Oracle(this.connectionString)
                .Excecute<SaleOrderList>(sql).AsEnumerable();
        }
    }
}
